package com.jzh.cmhSystem.entity;


import cn.afterturn.easypoi.excel.annotation.Excel;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@TableName("t_user_detail")
@EqualsAndHashCode(callSuper = false)
public class UserAndDetail {




    @TableId(type = IdType.AUTO)

    private Integer id;
    @Excel(name ="用户编号")
    private Integer userId;

    private Integer enterpriseId;

    @Excel(name ="用户名")
    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private String password;
    private String img;
    @Excel(name ="姓名")
    private String name;

    @Excel(name ="昵称")
    private String nickname;
    @TableField(exist = false)
    private int role;

    @Excel(name ="企业")
    @TableField(exist = false)
    private String enterpriseName;
    private Integer sectionId;
    @Excel(name ="部门")
    @TableField(exist = false)
    private String sectionName;

    @Excel(name ="企业联系方式")
    @TableField(exist = false)
    private String contact;

    @Excel(name ="企业联系方式",replace = {"男_1", "女_0"})
    private int sex;


    @Excel(name ="电话")
    private String phone;
    @Excel(name ="邮箱")
    private String email;

    @Excel(name ="创建时间",format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time", exist = false)
    private LocalDateTime createTime;

}
